import React, { FC } from 'react';
import { Button } from 'antd-mobile';
import './style.css';

interface LoginSuccessProps {
    jump: (value?: any) => void;
    imgSrc: string;
    btnText?: string;
}

// 注册成功组件
const LoginSuccess: FC<LoginSuccessProps> = (({ jump, imgSrc, btnText }) => {
    return (
        <div className='login-success'>
            <img src={imgSrc} className='image'/>
            <span className='title'>注册成功！</span>
            <Button
                block
                color='primary'
                size='large'
                onClick={() => jump && jump()}>
                {btnText || "返回首页"}
            </Button>
        </div>
    )

})
export default LoginSuccess;
